package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import model.Contact;
import model.SaveModel;
import model.SaveModificationsModel;
import view.AddWindow;
import view.MainWindow;
import view.ModifyWindow;

/**
 * This controller call the model which save the modifications made by the user on a contact profile
 * @author Marie Morin
 *
 */
public class SaveModificationsController implements ActionListener{
	
	
	private MainWindow w;
	private ModifyWindow m;
	private Contact c;
	
	public SaveModificationsController(MainWindow w, ModifyWindow m, Contact c){
		
		this.w = w;
		this.m = m;
		this.c = c;
	}

	/**
	 *  This function is called when the user click on the button save on the modification page of a contact
	 */
	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub

		SaveModificationsModel saveModificationsModel = new SaveModificationsModel(m, c);
		w.setLayoutNull();

		
	}

}
